package com.demo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 用户信息表
 * @author ZM
 * @since 2020-11-20
 */
@Data
@TableName("pd_user")
@ApiModel(value="User对象", description="用户信息表")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户ID")
    @TableId(value = "user_id",type = IdType.AUTO)
    private Integer userId;

    @ApiModelProperty(value = "角色ID")
    @TableField("role_id")
    private Integer roleId;

    @ApiModelProperty(value = "登录名称")
    @TableField("user_login_name")
    @NotBlank(message = "登录名称不能为空")
    private String userLoginName;

    @ApiModelProperty(value = "登录密码")
    @TableField("user_pass")
    private String userPass;

    @ApiModelProperty(value = "所属科室/病区")
    @TableField("user_department")
    private String userDepartment;

    @ApiModelProperty(value = "提醒消息提醒方式：1闪烁  2弹出")
    @TableField("remind")
    private Integer remind;

    @ApiModelProperty(value = "报警消息提醒方式：1闪烁  2弹出")
    @TableField("warn")
    private Integer warn;

    @ApiModelProperty(value = "上班状态：1正常  2值班  3隐身")
    @TableField("work_status")
    private Integer workStatus;

    @ApiModelProperty(value = "真实姓名")
    @TableField("user_true_name")
    private String userTrueName;

    @ApiModelProperty(value = "联系电话")
    @TableField("user_mobile")
    private String userMobile;

    @ApiModelProperty(value = "工号")
    @TableField("work_sn")
    private String workSn;

    @ApiModelProperty(value = "类型：1医生 2护士 3其他")
    @TableField("user_type")
    private Integer userType;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time",fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField("created_user_id")
    @NotNull(message = "创建人ID不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Integer createdUserId;

    @ApiModelProperty(value = "更新时间")
    @TableField("updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;

    @ApiModelProperty(value = "更新人ID")
    @TableField("updated_user_id")
    private Integer updatedUserId;

    @ApiModelProperty(value = "删除时间")
    @TableField("deleted_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deletedTime;

    @ApiModelProperty(value = "删除人ID")
    @TableField("deleted_user_id")
    private Integer deletedUserId;


}
